﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Inicio : System.Web.UI.Page
{
    ctrlInscripcion ctl = new ctrlInscripcion();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (ctl.esInscrito(txtMatricula.Text) == false)
        {
            if (ctl.buscarMatricula(txtMatricula.Text.ToString()))
            {
                Session.Add("matricula", txtMatricula.Text.ToString()); //matricula en variable de session
                Response.Redirect("Alumnos/Formato_Reins.aspx");
            }

            lblMsj.Text = ctl.Msj;
        }
        else {

            lblMsj.Text = "Usted ya esta inscrito";
        }
        
    }
}